import React from 'react';
import { Grid } from 'antd-mobile';
import {withRouter} from "react-router-dom"
import "./Groupen.less";



function Groupen(props) {
    function todetail(val) { 
        // console.log(val);
        props.history.push("/detail/"+val.id+"/2")
    }
    let { grouponLIst } = props;
    return (
        <div className="groupon">
            
            <div>
                <h3>万人团---千人不团</h3>
                <Grid data={grouponLIst}
                    columnNum={4}
                    isCarousel={true}
                    carouselMaxRow={1}
                    onClick={(val) => todetail(val)}
                    renderItem={grouponLIst => (
                        <div style={{ padding: '0.125rem' }}>
                            <img src={grouponLIst.img} style={{ width: '0.6rem', height: '0.6rem' }} alt="" />
                            <div style={{ color: '#888', fontSize: '0.14rem', marginTop: '0.12rem' }}>
                                <span>{grouponLIst.goodsname}</span>
                            </div>
                        </div>
                    )}
                />
            </div>
        </div>
    )
}
export default withRouter(Groupen)
